package o;

import android.content.Context;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import androidx.annotation.RestrictTo;
import androidx.annotation.RestrictTo.d;
import androidx.appcompat.widget.ActionBarContextView;
import java.lang.ref.WeakReference;
import o.aw.c;
import o.bd.e;

@RestrictTo({d.LIBRARY_GROUP})
public class ay extends aw implements e {
    private boolean ʼ;
    private bd ʽ;
    private ActionBarContextView ˊ;
    private c ˋ;
    private Context ˎ;
    private WeakReference<View> ˏ;
    private boolean ॱ;

    public ay(Context context, ActionBarContextView actionBarContextView, c cVar, boolean z) {
        this.ˎ = context;
        this.ˊ = actionBarContextView;
        this.ˋ = cVar;
        this.ʽ = new bd(actionBarContextView.getContext()).ॱ(1);
        this.ʽ.ॱ((e) this);
        this.ʼ = z;
    }

    public void ˋ(CharSequence charSequence) {
        this.ˊ.setTitle(charSequence);
    }

    public void ˏ(CharSequence charSequence) {
        this.ˊ.setSubtitle(charSequence);
    }

    public void ॱ(int i) {
        ˋ(this.ˎ.getString(i));
    }

    public void ˊ(int i) {
        ˏ(this.ˎ.getString(i));
    }

    public void ˋ(boolean z) {
        super.ˋ(z);
        this.ˊ.setTitleOptional(z);
    }

    public boolean ʻ() {
        return this.ˊ.ʻ();
    }

    public void ˎ(View view) {
        this.ˊ.setCustomView(view);
        this.ˏ = view != null ? new WeakReference(view) : null;
    }

    public void ˎ() {
        this.ˋ.ˎ((aw) this, this.ʽ);
    }

    public void ॱ() {
        if (!this.ॱ) {
            this.ॱ = true;
            this.ˊ.sendAccessibilityEvent(32);
            this.ˋ.ˎ(this);
        }
    }

    public Menu ˏ() {
        return this.ʽ;
    }

    public CharSequence ʽ() {
        return this.ˊ.ˋ();
    }

    public CharSequence ॱॱ() {
        return this.ˊ.ॱ();
    }

    public View ᐝ() {
        return this.ˏ != null ? (View) this.ˏ.get() : null;
    }

    public MenuInflater ˋ() {
        return new az(this.ˊ.getContext());
    }

    public boolean ॱ(bd bdVar, MenuItem menuItem) {
        return this.ˋ.ˎ((aw) this, menuItem);
    }

    public void ˎ(bd bdVar) {
        ˎ();
        this.ˊ.ˎ();
    }
}
